Support out of order grouped aggregate accumulation#8379
Open
gatesn wants to merge 4 commits into
Open
Conversation
Signed-off-by: "Nicholas Gates" <nick@nickgates.com>
Signed-off-by: "Nicholas Gates" <nick@nickgates.com>
Merging this PR will improve performance by ×2.1
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | Simulation | count_i32_clustered_nulls |
651.2 µs | 62.5 µs | ×10 |
| ⚡ | Simulation | sum_f64_clustered_nulls |
557.1 µs | 92.8 µs | ×6 |
| ⚡ | Simulation | sum_i32_clustered_nulls |
552.4 µs | 92.6 µs | ×6 |
| ⚡ | Simulation | count_varbinview |
253.9 µs | 50.5 µs | ×5 |
| ⚡ | Simulation | sum_f64_all_valid |
294.4 µs | 79.8 µs | ×3.7 |
| ⚡ | Simulation | sum_i32_nullable_all_valid |
328.9 µs | 138.1 µs | ×2.4 |
| ⚡ | Simulation | chunked_bool_canonical_into[(1000, 10)] |
35.5 µs | 20.3 µs | +74.93% |
| ⚡ | Simulation | chunked_varbinview_canonical_into[(1000, 10)] |
198.1 µs | 161.7 µs | +22.48% |
| ⚡ | Simulation | chunked_varbinview_into_canonical[(1000, 10)] |
213.5 µs | 177.1 µs | +20.57% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[128] |
244.4 ns | 215.3 ns | +13.55% |
| ⚡ | Simulation | encode_varbin[(1000, 4)] |
159.7 µs | 142.4 µs | +12.11% |
| ⚡ | Simulation | encode_varbin[(1000, 8)] |
160.4 µs | 143.5 µs | +11.73% |
| ⚡ | Simulation | encode_varbin[(1000, 32)] |
164.9 µs | 148.7 µs | +10.87% |
| ⚡ | Simulation | bitwise_not_vortex_buffer_mut[1024] |
304.7 ns | 275.6 ns | +10.58% |
| ⚡ | Simulation | encode_varbin[(1000, 512)] |
219.7 µs | 199.3 µs | +10.24% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ngates/grouped-aggregate (adae76e) with develop (8acef3a)
Signed-off-by: "Nicholas Gates" <nick@nickgates.com>
I, Nicholas Gates <nick@nickgates.com>, hereby add my Signed-off-by to this commit: 6bdcd32 I, Nicholas Gates <nick@nickgates.com>, hereby add my Signed-off-by to this commit: 9bd157f I, Nicholas Gates <nick@nickgates.com>, hereby add my Signed-off-by to this commit: 50701b2 Signed-off-by: Nicholas Gates <nick@nickgates.com>
Contributor
|
We wait that vortex was a linear scan engine. This breaks it correct? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Our original API for grouped aggregate functions only supported groups that we pre-sorted into complete lists. That means large groups would need to be globally sorted before we could start accumulating their internal state. This is not how most engines define their aggregate APIs.
This PR allows us to support grouped accumulation in the more traditional way by using group IDs.